package componentes;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

public cclass FechaHora {

	public String getDateTime() {
		DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
		Date date = new Date();
		return dateFormat.format(date);
	} 
	
	public static void main(String[] args) {
	FechaHora fh = new FechaHora();
	System.out.println(fh.getDateTime());

	}

}
